cargo.git
11 years agofix build on recent rust: use `unwrap` on `encode`
Сухарик [Fri, 23 Jan 2015 22:55:25 +0000 (01:55 +0300)]
fix build on recent rust: use `unwrap` on `encode`

11 years agoupdate to recent rust changes: part #1
Сухарик [Fri, 23 Jan 2015 18:42:29 +0000 (21:42 +0300)]
update to recent rust changes: part #1

11 years agoAuto merge of #1202 - alexcrichton:issue-1201, r=huonw
bors [Thu, 22 Jan 2015 06:06:34 +0000 (06:06 +0000)]
Auto merge of #1202 - alexcrichton:issue-1201, r=huonw

Previously an error's description was not printed at all if it was not a "human
error". This alters the logic to always print the description on --verbose, as
well as ensuring that --verbose is suggested if this is the case and we're not
verbose.

Closes #1201

11 years agoAuto merge of #1205 - alexcrichton:case-sensitivity, r=brson
bors [Thu, 22 Jan 2015 05:48:09 +0000 (05:48 +0000)]
Auto merge of #1205 - alexcrichton:case-sensitivity, r=brson

All crates published will enter the index in an all-lowercase fashion. This is
done because the index may be checked out on case-insensitive filesystems and
its integrity needs to be preserved. When looking for a file in the index, a
crate's name is transformed to all lowercase, but the mentioned name in the
index is verified against the name queried to ensure that they match.

Closes rust-lang/crates.io#93
cc rust-lang/crates.io-index#1

11 years agoSearch the index case-insensitively
Alex Crichton [Wed, 21 Jan 2015 20:24:34 +0000 (12:24 -0800)]
Search the index case-insensitively

All crates published will enter the index in an all-lowercase fashion. This is
done because the index may be checked out on case-insensitive filesystems and
its integrity needs to be preserved. When looking for a file in the index, a
crate's name is transformed to all lowercase, but the mentioned name in the
index is verified against the name queried to ensure that they match.

Closes rust-lang/crates.io#93
cc rust-lang/crates.io-index#1

11 years agoAuto merge of #1199 - retep998:winapi, r=alexcrichton
bors [Tue, 20 Jan 2015 17:24:32 +0000 (17:24 +0000)]
Auto merge of #1199 - retep998:winapi, r=alexcrichton

11 years agoFix printing full descriptions on --verbose
Alex Crichton [Tue, 20 Jan 2015 16:07:26 +0000 (08:07 -0800)]
Fix printing full descriptions on --verbose

Previously an error's description was not printed at all if it was not a "human
error". This alters the logic to always print the description on --verbose, as
well as ensuring that --verbose is suggested if this is the case and we're not
verbose.

Closes #1201

11 years agoUse external crates for Windows FFI
Peter Atashian [Tue, 20 Jan 2015 16:01:52 +0000 (11:01 -0500)]
Use external crates for Windows FFI

Signed-off-by: Peter Atashian <retep998@gmail.com>
11 years agoAuto merge of #1190 - alexcrichton:issue-1186, r=alexcrichton
bors [Tue, 20 Jan 2015 04:51:54 +0000 (04:51 +0000)]
Auto merge of #1190 - alexcrichton:issue-1186, r=alexcrichton

Closes #1186

11 years agoAuto merge of #1195 - alexcrichton:no-more-build-command, r=huonw
bors [Tue, 20 Jan 2015 01:25:10 +0000 (01:25 +0000)]
Auto merge of #1195 - alexcrichton:no-more-build-command, r=huonw

Along the way this also fixes a few bugs with build scripts with respect to dynamic native libraries which are linked into build scripts themselves.

11 years agoAuto merge of #1196 - alexcrichton:issue-1187, r=alexcrichton
bors [Tue, 20 Jan 2015 00:38:16 +0000 (00:38 +0000)]
Auto merge of #1196 - alexcrichton:issue-1187, r=alexcrichton

Closes #1187

11 years agoFix code example in the guide
Alex Crichton [Tue, 20 Jan 2015 00:03:41 +0000 (16:03 -0800)]
Fix code example in the guide

Closes #1187

11 years agoAugment dylib search paths for rustc/build scripts
Alex Crichton [Mon, 19 Jan 2015 23:46:07 +0000 (15:46 -0800)]
Augment dylib search paths for rustc/build scripts

Whenever a build script or a plugin depends on a native dynamic library, the
dylib search path will be required to include the path to the generated dynamic
library. Currently Cargo does not augment the search path, causing load errors
or execution errors whenever builds are attempted in this case.

This commit remedies the situation by ensuring that dynamic libraries show up in
dylib search paths. This commit is necessary to fully migrate the remaining
tests from the old build command infrastructure to build scripts.

11 years agoRemove infrastructure for the old custom build command
Alex Crichton [Mon, 19 Jan 2015 22:27:51 +0000 (14:27 -0800)]
Remove infrastructure for the old custom build command

This aspect of the manifest has been deprecated for quite some time now, and
this commit purges the support entirely.

11 years agoAuto merge of #1193 - alexcrichton:update, r=huonw
bors [Mon, 19 Jan 2015 23:13:03 +0000 (23:13 +0000)]
Auto merge of #1193 - alexcrichton:update, r=huonw

One important update this picks up is toml-rs v0.1.13 which includes some recent changes to the TOML spec (shouldn't be breaking for Cargo though)

11 years agoUpdate to rust master
Alex Crichton [Mon, 19 Jan 2015 21:19:46 +0000 (13:19 -0800)]
Update to rust master

11 years agoAuto merge of #1191 - alexcrichton:fix-bots, r=huonw
bors [Mon, 19 Jan 2015 07:28:44 +0000 (07:28 +0000)]
Auto merge of #1191 - alexcrichton:fix-bots, r=huonw

The nightly bots are all failing because a nightly build emits a .cargo/config
which uses `[target]` for some overrides, but a test was creating invalid
configuration for `[target]`, causing the test error message to change.

This commit fixes the test by using a different error message (which should not
conflict). It also improves the error message for "configuration could not be
merged" to include more contextual information about what just happened.

11 years agoFix nightly and improve merge error message
Alex Crichton [Mon, 19 Jan 2015 05:02:25 +0000 (21:02 -0800)]
Fix nightly and improve merge error message

The nightly bots are all failing because a nightly build emits a .cargo/config
which uses `[target]` for some overrides, but a test was creating invalid
configuration for `[target]`, causing the test error message to change.

This commit fixes the test by using a different error message (which should not
conflict). It also improves the error message for "configuration could not be
merged" to include more contextual information about what just happened.

11 years agoUpdate `cargo update` syntax in the guide
Alex Crichton [Mon, 19 Jan 2015 02:56:30 +0000 (18:56 -0800)]
Update `cargo update` syntax in the guide

Closes #1186

11 years agoAuto merge of #1189 - alexcrichton:issue-1185, r=huonw
bors [Mon, 19 Jan 2015 02:53:02 +0000 (02:53 +0000)]
Auto merge of #1189 - alexcrichton:issue-1185, r=huonw

Closes #1185

11 years agoUpdate build script docs for rustc changes
Alex Crichton [Mon, 19 Jan 2015 02:36:17 +0000 (18:36 -0800)]
Update build script docs for rustc changes

Closes #1185

11 years agoAuto merge of #1183 - parkr:patch-1, r=wycats
bors [Sun, 18 Jan 2015 18:25:21 +0000 (18:25 +0000)]
Auto merge of #1183 - parkr:patch-1, r=wycats

This seemed a little crucial.

11 years agoAdd note about specifying dependencies.
Parker Moore [Sat, 17 Jan 2015 08:55:58 +0000 (00:55 -0800)]
Add note about specifying dependencies.

11 years agoAuto merge of #1176 - alexcrichton:less-relative, r=alexcrichton
bors [Fri, 16 Jan 2015 19:56:26 +0000 (19:56 +0000)]
Auto merge of #1176 - alexcrichton:less-relative, r=alexcrichton

Turns out path_relative_from returns Some even if they're not ancestors of one
another! This adds an explicit check for `is_ancestor_of`.

11 years agoActually use absolute paths for crates.io crates
Alex Crichton [Thu, 15 Jan 2015 20:17:18 +0000 (12:17 -0800)]
Actually use absolute paths for crates.io crates

Turns out path_relative_from returns Some even if they're not ancestors of one
another! This adds an explicit check for `is_ancestor_of`.

11 years agoAuto merge of #1172 - alexcrichton:issue-1087, r=huonw
bors [Fri, 16 Jan 2015 19:03:06 +0000 (19:03 +0000)]
Auto merge of #1172 - alexcrichton:issue-1087, r=huonw

These commits aim to streamline how errors are generated and how configuration is read to be less error prone and more easily extensible.

This was a whole bunch of yak shaving when tackling #1087.

11 years agoPrint human errors in traces by default
Alex Crichton [Fri, 16 Jan 2015 17:43:28 +0000 (09:43 -0800)]
Print human errors in traces by default

This helps get nice pretty stack traces which terminate when we get into the
weeds of errors but still present relevant contextual information when Cargo
isn't run with --verbose

11 years agoDon't lose error traces in manifest parse errors
Alex Crichton [Thu, 15 Jan 2015 19:12:13 +0000 (11:12 -0800)]
Don't lose error traces in manifest parse errors

Closes #1174

11 years agoAllow configuration of jobs by default via build.jobs
Alex Crichton [Thu, 15 Jan 2015 08:20:56 +0000 (00:20 -0800)]
Allow configuration of jobs by default via build.jobs

Continuation of #1114
Closes #1108

11 years agoAdd a configuration option for HTTP timeouts
Alex Crichton [Wed, 14 Jan 2015 18:11:08 +0000 (10:11 -0800)]
Add a configuration option for HTTP timeouts

Closes #1087

11 years agoVastly improve configuration error messages
Alex Crichton [Wed, 14 Jan 2015 17:58:43 +0000 (09:58 -0800)]
Vastly improve configuration error messages

This commit seeks to improve error messages with respect to a misconfigured
Cargo. This is done with a few principles and architectural changes:

* All error messages related to configuration should now mention the file in
  question.
* All error messages should print the key in question which was in error.
* Loading configuration values is now centralized in the `Config` structure,
  providing precisely one location where error message originate from. The
  messages were previously strewn and duplicated about.
* The `Config` structure now provides typed `get_foo` methods to load various
  configuration keys of various types.

11 years agoOverhaul how Config is passed around
Alex Crichton [Wed, 14 Jan 2015 08:19:27 +0000 (00:19 -0800)]
Overhaul how Config is passed around

This commit started out by moving the hash map of configuration values into
`Config` and then removing all calls to config::all_configs in favor of taking a
`&Config` argument. This initial step was taken to prevent reloading
configuration many times from disk, but it also provides a nice house for
configuration to be loaded from.

The commit snowballed into purging `MultiShell` as an argument all over the
place and passing around `Config` instead. Along the way a few other breaking
changes were made:

* The `config_for_key` and `config_list` subcommands have been removed. These
  commands are not ready to be stabilized and need some more work. In general
  the `cargo config` system needs to be cleaned out and built back up with a new
  interface, at which point these subcommands can return.
* The old and deprecated behavior of `cargo update foo` has been removed.

11 years agoAuto merge of #1166 - alexcrichton:docs, r=steveklabnik
bors [Fri, 16 Jan 2015 04:17:53 +0000 (04:17 +0000)]
Auto merge of #1166 - alexcrichton:docs, r=steveklabnik

11 years agoAdd a short section about path dependencies
Alex Crichton [Wed, 14 Jan 2015 04:04:43 +0000 (20:04 -0800)]
Add a short section about path dependencies

Closes #640

11 years agoCall out libs a little more in the guide
Alex Crichton [Wed, 14 Jan 2015 03:59:00 +0000 (19:59 -0800)]
Call out libs a little more in the guide

Closes #643

11 years agoClarify that features are actually sets of features
Alex Crichton [Wed, 14 Jan 2015 03:56:48 +0000 (19:56 -0800)]
Clarify that features are actually sets of features

Closes #938

11 years agoMention profiles in --help pages
Alex Crichton [Wed, 14 Jan 2015 03:54:55 +0000 (19:54 -0800)]
Mention profiles in --help pages

Closes #999

11 years agoAuto merge of #1151 - alexcrichton:issue-1145, r=wycats
bors [Wed, 14 Jan 2015 19:14:12 +0000 (19:14 +0000)]
Auto merge of #1151 - alexcrichton:issue-1145, r=wycats

The new message will print out a selection of versions that were found if any
are to be had, as well as a recommendation to run `cargo update` if it's a path
dependency.

Closes #1145

11 years agoPrint nicer messages on 'no package named' errors
Alex Crichton [Sun, 11 Jan 2015 07:03:58 +0000 (23:03 -0800)]
Print nicer messages on 'no package named' errors

The new message will print out a selection of versions that were found if any
are to be had, as well as a recommendation to run `cargo update` if it's a path
dependency.

Closes #1145

11 years agoAuto merge of #1164 - alexcrichton:issue-209, r=huonw
bors [Wed, 14 Jan 2015 16:44:32 +0000 (16:44 +0000)]
Auto merge of #1164 - alexcrichton:issue-209, r=huonw

All paths printed will now be absolute paths unless the path is a descendant of
the current directory. This should keep error messages and warnings of a
reasonable length when working with the local project while still allowing
errors in registry/git dependencies to be tracked down.

Special care is taken in these situations to ensure that the error message from
the compiler prints a reasonable path.

Closes #209
Closes #694

11 years agoAuto merge of #1168 - alexcrichton:issue-822, r=huonw
bors [Wed, 14 Jan 2015 16:22:15 +0000 (16:22 +0000)]
Auto merge of #1168 - alexcrichton:issue-822, r=huonw

Closes #822

11 years agoAuto merge of #1167 - alexcrichton:issue-820, r=huonw
bors [Wed, 14 Jan 2015 09:04:10 +0000 (09:04 +0000)]
Auto merge of #1167 - alexcrichton:issue-820, r=huonw

Probably a good sanity check to have up front to ensure that you've got a C
compiler locally!

Closes #820

11 years agoAuto merge of #1163 - alexcrichton:better-errors, r=huonw
bors [Wed, 14 Jan 2015 06:55:18 +0000 (06:55 +0000)]
Auto merge of #1163 - alexcrichton:better-errors, r=huonw

Print out the path to the manifest in question whenever a parsing error is
encountered.

11 years agoAuto merge of #1165 - alexcrichton:issue-517, r=huonw
bors [Wed, 14 Jan 2015 06:12:53 +0000 (06:12 +0000)]
Auto merge of #1165 - alexcrichton:issue-517, r=huonw

It's a little odd that Cargo only supports travis right now, and as #517 points
out it probably shouldn't be a top-level flag but rather a general "service
flag". Due to a lack of other services and the ease of adding your own travis
configuration, this commit removes the flag altogether for now. It can always be
added later when we've got some more impetus!

Closes #517
Closes #1115

11 years agoUse same find -perm syntax as rustc
Alex Crichton [Wed, 14 Jan 2015 04:21:52 +0000 (20:21 -0800)]
Use same find -perm syntax as rustc

Closes #822

11 years agoProbe for a C compiler in the configure script
Alex Crichton [Wed, 14 Jan 2015 04:19:26 +0000 (20:19 -0800)]
Probe for a C compiler in the configure script

Probably a good sanity check to have up front to ensure that you've got a C
compiler locally!

Closes #820

11 years agoRemove --travis from `cargo new`
Alex Crichton [Wed, 14 Jan 2015 03:48:00 +0000 (19:48 -0800)]
Remove --travis from `cargo new`

It's a little odd that Cargo only supports travis right now, and as #517 points
out it probably shouldn't be a top-level flag but rather a general "service
flag". Due to a lack of other services and the ease of adding your own travis
configuration, this commit removes the flag altogether for now. It can always be
added later when we've got some more impetus!

Closes #517
Closes #1115

11 years agoTweak how source paths are passed to the compiler
Alex Crichton [Wed, 14 Jan 2015 03:10:16 +0000 (19:10 -0800)]
Tweak how source paths are passed to the compiler

All paths printed will now be absolute paths unless the path is a descendant of
the current directory. This should keep error messages and warnings of a
reasonable length when working with the local project while still allowing
errors in registry/git dependencies to be tracked down.

Special care is taken in these situations to ensure that the error message from
the compiler prints a reasonable path.

Closes #209
Closes #694

11 years agoImprove errors for invalid manifests
Alex Crichton [Wed, 14 Jan 2015 02:43:33 +0000 (18:43 -0800)]
Improve errors for invalid manifests

Print out the path to the manifest in question whenever a parsing error is
encountered.

11 years agoAuto merge of #1160 - alexcrichton:update, r=alexcrichton
bors [Tue, 13 Jan 2015 22:14:44 +0000 (22:14 +0000)]
Auto merge of #1160 - alexcrichton:update, r=alexcrichton

11 years agoUpdate to rust master
Alex Crichton [Tue, 13 Jan 2015 16:41:04 +0000 (08:41 -0800)]
Update to rust master

11 years agoAuto merge of #1161 - alexcrichton:issue-1159, r=huonw
bors [Tue, 13 Jan 2015 21:09:13 +0000 (21:09 +0000)]
Auto merge of #1161 - alexcrichton:issue-1159, r=huonw

Looks like these got tweaked from the compiler...

Closes #1159

11 years agoAuto merge of #1154 - tshepang:patch-1, r=alexcrichton
bors [Tue, 13 Jan 2015 17:36:14 +0000 (17:36 +0000)]
Auto merge of #1154 - tshepang:patch-1, r=alexcrichton

11 years agoRelax checks for error messages
Alex Crichton [Tue, 13 Jan 2015 16:53:55 +0000 (08:53 -0800)]
Relax checks for error messages

Looks like these got tweaked from the compiler...

Closes #1159

11 years agodoc: typo fix
Tshepang Lekhonkhobe [Mon, 12 Jan 2015 22:21:37 +0000 (00:21 +0200)]
doc: typo fix

11 years agoAuto merge of #1148 - FlaPer87:change-home, r=alexcrichton
bors [Sun, 11 Jan 2015 05:18:59 +0000 (05:18 +0000)]
Auto merge of #1148 - FlaPer87:change-home, r=alexcrichton

Users changing cargo's home directory expect it to be used as top path
instead of there being a `.cargo` hidden dir in it. There are some cases
following this pattern one of them is python's virtualenvwrapper, which
uses `WORK_HOME` as a home dir for everything.

This patch removes the extra `.cargo` and assumes that CARGO_HOME is the
real path a user wants to use as a homedir for cargo.

11 years agoAuto merge of #1149 - rndr:issue-1146, r=alexcrichton
bors [Sun, 11 Jan 2015 04:36:17 +0000 (04:36 +0000)]
Auto merge of #1149 - rndr:issue-1146, r=alexcrichton

Closes #1146

11 years agouse release profile for examples build with --release flag
rndr [Sun, 11 Jan 2015 02:47:24 +0000 (07:47 +0500)]
use release profile for examples build with --release flag

11 years agoDon't use `.cargo` for custom CARGO_HOME
Flavio Percoco [Sat, 10 Jan 2015 23:44:12 +0000 (00:44 +0100)]
Don't use `.cargo` for custom CARGO_HOME

Users changing cargo's home directory expect it to be used as top path
instead of there being a `.cargo` hidden dir in it. There are some cases
following this pattern one of them is python's virtualenvwrapper, which
uses `WORK_HOME` as a home dir for everything.

This patch removes the extra `.cargo` and assumes that CARGO_HOME is the
real path a user wants to use as a homedir for cargo.

11 years agoAuto merge of #1143 - alexcrichton:issue-1138, r=huonw
bors [Fri, 9 Jan 2015 23:38:12 +0000 (23:38 +0000)]
Auto merge of #1143 - alexcrichton:issue-1138, r=huonw

Same fix as #923.

Closes #1138

11 years agoDon't require Cargo.toml for `cargo yank`
Alex Crichton [Fri, 9 Jan 2015 23:33:35 +0000 (15:33 -0800)]
Don't require Cargo.toml for `cargo yank`

Same fix as #923.

Closes #1138

11 years agoAuto merge of #1141 - sp3d:master, r=alexcrichton
bors [Fri, 9 Jan 2015 22:13:10 +0000 (22:13 +0000)]
Auto merge of #1141 - sp3d:master, r=alexcrichton

document ~/.cargo and CARGO_HOME, specify manpage section for rustc/rustdoc

11 years agogive docs a little attention
sp3d [Fri, 9 Jan 2015 22:02:30 +0000 (22:02 +0000)]
give docs a little attention

document ~/.cargo and CARGO_HOME, specify manpage section for rustc/rustdoc

11 years agoAuto merge of #1131 - alexcrichton:issue-880, r=brson
bors [Thu, 8 Jan 2015 20:52:43 +0000 (20:52 +0000)]
Auto merge of #1131 - alexcrichton:issue-880, r=brson

This fixes a number of bugs along the way:

* Submodules are now recursed into explicitly for packaging, fixing #943
* A whitelist has been implemented, fixing #880
* Git repos are now always used if there is a package that resides at the root,
  not just if the current package resides at the root.

11 years agoUpdate how a PathSource is traversed for git repos
Alex Crichton [Tue, 6 Jan 2015 07:54:16 +0000 (23:54 -0800)]
Update how a PathSource is traversed for git repos

This fixes a number of bugs along the way:

* Submodules are now recursed into explicitly for packaging, fixing #943
* A whitelist has been implemented, fixing #880
* Git repos are now always used if there is a package that resides at the root,
  not just if the current package resides at the root.

11 years agoAuto merge of #1122 - alexcrichton:issue-1119, r=brson
bors [Thu, 8 Jan 2015 19:35:06 +0000 (19:35 +0000)]
Auto merge of #1122 - alexcrichton:issue-1119, r=brson

It looks like tags don't always point to tag objects, but rather sometimes to
commits themselves. This tweaks the peeling logic for tags to find an *object*
first, and then peel to a commit, rather than finding a tag first and then
peeling.

Closes #1119

11 years agoAuto merge of #1120 - rndr:issue-831, r=alexcrichton
bors [Thu, 8 Jan 2015 19:18:04 +0000 (19:18 +0000)]
Auto merge of #1120 - rndr:issue-831, r=alexcrichton

Closes #831

11 years agoAllow using --release flag with --example
rndr [Sat, 3 Jan 2015 16:33:08 +0000 (21:33 +0500)]
Allow using --release flag with --example
Closes #831

11 years agoAuto merge of #1124 - wesleywiser:vcs_config_option, r=alexcrichton
bors [Tue, 6 Jan 2015 02:37:42 +0000 (02:37 +0000)]
Auto merge of #1124 - wesleywiser:vcs_config_option, r=alexcrichton

11 years agoAuto merge of #1123 - alexcrichton:issue-1037, r=alexcrichton
bors [Tue, 6 Jan 2015 02:21:22 +0000 (02:21 +0000)]
Auto merge of #1123 - alexcrichton:issue-1037, r=alexcrichton

Now that the compiler supports the notion for a "dependency lookup path" Cargo
can specify this information to the compiler in order to prevent transitive
dependencies from being imported.

Closes #1037

11 years agogit option in config should be an enumeration
Wesley Wiser [Mon, 5 Jan 2015 01:59:43 +0000 (20:59 -0500)]
git option in config should be an enumeration

The option in ~/.cargo/config is now called `vcs` and has the following
options: "git", "hg", and "none". This corresponds to the options for
the --vcs argument to `cargo new`.

This also fixes detection for hg repositories. Previously, we only tried
to discover if the working directory was contained in a git repository.
If it was, we would skip creating a git repo. Now, we check if the
working directory is contained in either a git or mecurial repo. If it
is, we skip creating a new repo.

Fixes #1116

11 years ago[cargo new] Add a new --vcs enumeration flag
Wesley Wiser [Sun, 4 Jan 2015 23:11:55 +0000 (18:11 -0500)]
[cargo new] Add a new --vcs enumeration flag

Replace the --git, --hg, and --no-git flags with a --vcs enumeration
flag which supports the values "git", "hg", and "none".

Related to #1116

11 years agoStart using precise -L flags
Alex Crichton [Sun, 4 Jan 2015 09:16:33 +0000 (01:16 -0800)]
Start using precise -L flags

Now that the compiler supports the notion for a "dependency lookup path" Cargo
can specify this information to the compiler in order to prevent transitive
dependencies from being imported.

Closes #1037

11 years agoUpdate to rust master
Alex Crichton [Sun, 4 Jan 2015 09:02:16 +0000 (01:02 -0800)]
Update to rust master

11 years agoAuto merge of #1126 - akiss77:pr-test_cargo_compile, r=alexcrichton
bors [Mon, 5 Jan 2015 18:37:39 +0000 (18:37 +0000)]
Auto merge of #1126 - akiss77:pr-test_cargo_compile, r=alexcrichton

For two tests, the `Cargo.toml`s and the `cfg`s don't match. E.g., the first test expects a successful build on all linux platforms but its `toml` is prepared for Intel linuxes only. The second test is very similar.

Here, the `cfg`s are amended to match the `toml`s.

11 years agoAuto merge of #1107 - tomaka:extract-commands-system, r=alexcrichton
bors [Mon, 5 Jan 2015 16:36:00 +0000 (16:36 +0000)]
Auto merge of #1107 - tomaka:extract-commands-system, r=alexcrichton

With this change, the various commands in Cargo now build a `CommandPrototype` instead of a `ProcessBuilder`. This `CommandPrototype` is then passed to an object that implements the `CommandsExecution` trait, which executes them.

Ideally `CommandPrototype` would look like this:

```rust
enum CommandPrototype {
    Rustc {
        libraries: Vec<String>,
        opt_level: uint,
        input: Path,
        ... etc... (all the options that can be passed to rustc)
    },
    Rustdoc {
        ...  (all the options that can be passed to rustdoc)
    },
    Custom {
        cmd: ...,
        env: ...,
    }
}
```

...but that's a bit too much work for now (maybe in a follow-up).

What this enables is using the Cargo library to intercept the build commands and tweak them. I'm planning to write `cargo-emscripten` thanks to this change.

With this, one could also imagine embedding rustc and rustdoc directly inside cargo, if that is needed.

11 years agoFix cfg of platform-specific tests
Akos Kiss [Mon, 5 Jan 2015 15:53:22 +0000 (15:53 +0000)]
Fix cfg of platform-specific tests

11 years agoBuild a CommandPrototype instead of a ProcessBuilder
Pierre Krieger [Tue, 30 Dec 2014 17:15:44 +0000 (18:15 +0100)]
Build a CommandPrototype instead of a ProcessBuilder

11 years agoFind objects instead of tags.
Alex Crichton [Sun, 4 Jan 2015 06:45:58 +0000 (22:45 -0800)]
Find objects instead of tags.

It looks like tags don't always point to tag objects, but rather sometimes to
commits themselves. This tweaks the peeling logic for tags to find an *object*
first, and then peel to a commit, rather than finding a tag first and then
peeling.

Closes #1119

11 years agoAuto merge of #1121 - brson:installer, r=alexcrichton
bors [Sat, 3 Jan 2015 23:29:22 +0000 (23:29 +0000)]
Auto merge of #1121 - brson:installer, r=alexcrichton

No fixes here apply to Cargo. Just keeping up to date.

11 years agoUpdate rust-installer
Brian Anderson [Sat, 3 Jan 2015 20:37:25 +0000 (12:37 -0800)]
Update rust-installer

No fixes here apply to Cargo. Just keeping up to date.

11 years agoAuto merge of #1118 - brson:installer, r=alexcrichton
bors [Sat, 3 Jan 2015 05:33:05 +0000 (05:33 +0000)]
Auto merge of #1118 - brson:installer, r=alexcrichton

Fixes a syntax error in the install script

11 years agoUpdate rust-installer
Brian Anderson [Sat, 3 Jan 2015 01:00:09 +0000 (17:00 -0800)]
Update rust-installer

11 years agoAuto merge of #1117 - alexcrichton:update, r=alexcrichton
bors [Fri, 2 Jan 2015 21:41:12 +0000 (21:41 +0000)]
Auto merge of #1117 - alexcrichton:update, r=alexcrichton

11 years agoUpdate to rust master
Alex Crichton [Fri, 2 Jan 2015 21:39:30 +0000 (13:39 -0800)]
Update to rust master

11 years agoAuto merge of #1111 - alexcrichton:rollup, r=alexcrichton
bors [Wed, 31 Dec 2014 21:39:41 +0000 (21:39 +0000)]
Auto merge of #1111 - alexcrichton:rollup, r=alexcrichton

11 years agoAuto merge of #1110 - brson:install, r=alexcrichton
bors [Wed, 31 Dec 2014 21:10:58 +0000 (21:10 +0000)]
Auto merge of #1110 - brson:install, r=alexcrichton

This bug shouldn't actually cause any problems but it's a mistake that causes cargo's manifest to be stored in `/usr/lib/cargo` instead of `/usr/lib/rustlib`. People who upgrade will probably end up with an extra 'cargo' dir laying around...

11 years agoUpdate usage of git2-rs
Alex Crichton [Wed, 31 Dec 2014 20:02:18 +0000 (12:02 -0800)]
Update usage of git2-rs

11 years agoMerge branch 'master' of https://github.com/marcbowes/cargo into pr-1094
Alex Crichton [Wed, 31 Dec 2014 19:57:02 +0000 (11:57 -0800)]
Merge branch 'master' of https://github.com/marcbowes/cargo into pr-1094

11 years agoAdd a test for CARGO_PKG_VERSION
Alex Crichton [Wed, 31 Dec 2014 19:54:15 +0000 (11:54 -0800)]
Add a test for CARGO_PKG_VERSION

11 years agoMerge branch 'cargo_pkg_version' of https://github.com/wesleywiser/cargo into pr...
Alex Crichton [Wed, 31 Dec 2014 19:52:38 +0000 (11:52 -0800)]
Merge branch 'cargo_pkg_version' of https://github.com/wesleywiser/cargo into pr-1094

11 years agomk: Fix cargo installation manifest location
Brian Anderson [Wed, 31 Dec 2014 19:47:07 +0000 (11:47 -0800)]
mk: Fix cargo installation manifest location

11 years agoUpdate dependencies for ascii reform
Marc Bowes [Tue, 30 Dec 2014 12:13:36 +0000 (14:13 +0200)]
Update dependencies for ascii reform

11 years agoAuto merge of #1102 - brson:rust-installer-v2, r=brson
bors [Tue, 30 Dec 2014 18:14:23 +0000 (18:14 +0000)]
Auto merge of #1102 - brson:rust-installer-v2, r=brson

Needs to merge directly after https://github.com/rust-lang/rust/pull/20317

11 years agoAuto merge of #1082 - alexcrichton:std-error, r=alexcrichton
bors [Tue, 30 Dec 2014 03:47:46 +0000 (03:47 +0000)]
Auto merge of #1082 - alexcrichton:std-error, r=alexcrichton

11 years agoFix 'make no-exes'
Brian Anderson [Tue, 30 Dec 2014 03:03:54 +0000 (19:03 -0800)]
Fix 'make no-exes'

11 years agoClean up Cargo's util::errors module
Alex Crichton [Sun, 21 Dec 2014 23:19:44 +0000 (15:19 -0800)]
Clean up Cargo's util::errors module

This commit cleans up cargo's error module to reduce the duplication of
`CargoError` and the standard library's `Error` trait. The `CargoError` trait
remains, but only has one methods, `is_human`.

A number of other modifications were made:

* ChainError was altered to work over unboxed closures
* Wrap and Require were removed as they're duplicates of the ChainError
  functionality.
* Many public error types are now private from util::errors as they're only
  returned as boxed trait objects.
* The `concrete` was removed, all calls to `make_human` are now done through a
  newtype `Human` wrapper.
* Cargo's custom `try!` macro was removed.

11 years agoRemoves macro and conflicting impls
Felipe Sere [Wed, 17 Dec 2014 21:18:24 +0000 (21:18 +0000)]
Removes macro and conflicting impls

11 years agoNaive replacement of FromError
Felipe Sere [Wed, 17 Dec 2014 20:56:33 +0000 (20:56 +0000)]
Naive replacement of FromError

11 years agoauto merge of #1100 : kballard/cargo/tweak-readme-install-instructions, r=alexcrichton
bors [Tue, 30 Dec 2014 02:28:49 +0000 (02:28 +0000)]
auto merge of #1100 : kballard/cargo/tweak-readme-install-instructions, r=alexcrichton

There's no need to promote the use of the `pwd` command when shells export the
current directory as `$PWD`. Using `$PWD` makes the commandline work in fish
as well. Additionally, quote the variable so it works properly even if the cwd
has a space in it.